#include "library.h"

// 初始化ImGui
BOOL WINAPI InitializeImGui(HWND hWnd, IDirect3DDevice9* direct3DDevice9) {

    IMGUI_CHECKVERSION();
    ImGui::CreateContext();
    ImGuiIO& io = ImGui::GetIO(); (void)io;

    // 不生成配置文件
    io.IniFilename = nullptr;
    io.LogFilename = nullptr;
    ImGui::StyleColorsLight();

    // TODO 优化成内存字体
    // io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\msyhl.ttc", 18.0f, NULL, io.Fonts->GetGlyphRangesChineseFull());

    ImGui_ImplWin32_Init(hWnd);
    ImGui_ImplDX9_Init(direct3DDevice9);

    return TRUE;
}
